<!DOCTYPE html>
<html class="pixel-ratio-1" style="background-color: #f1f1f1">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
        <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
        <meta name="viewport" content="width=375,user-scalabe=no" />
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="expires" content="0" />
        <script src="../../../../public/vendor/flexible/flexible.js"></script>
        <title>销售订单-新增</title>
        <link rel="stylesheet" type="text/css" href="../../../../public/vendor/weui/weui.min.css" />
        <link rel="stylesheet" type="text/css" href="../../../../public/css/common.css" />
        <link rel="stylesheet" type="text/css" href="../../../../public/css/iconfont/iconfont.css" />
        <link rel="stylesheet" href="../../../../public/vendor/weui/jquery-weui.css" />
        <link rel="stylesheet" href="../../../../public/vendor/select2/select2.css" />
        <link rel="stylesheet" href="../../../../public/themes/base/css/site.css" id="admui-siteStyle" />
        <link rel="stylesheet" href="../../../../public/css/features/breedsales/saleorders/addsaleorders.css" />

        <script id="addsaleorders-template" type="text/x-template">
            {{~ it :value:index}}
            <div class="report-contents-item-box" id="{{=value.seq}}" data-customer="{{=value.cstmId}}">
                {{? !Utils.IsNotNull(value.deiverName)}}
                <div class="weui-flex marbot">
                    <div style="position: absolute; right: 20px; margin-top: 10px; ">
                        <div class="placeholder" v-html="item.billStatusCh">
                            <span class="badge badge-outline badge-warning" style="padding: 6px;border-radius: 15px;font-size: 14px;">数据待完善</span>
                        </div>
                    </div>
                </div>
                {{?}}
                <div style="padding: 15px;">
                    {{? Utils.IsNotNull(value.deiverName)}}
                    <div style="font-size: 18px;">{{=value.deiverName}} / {{=value.carNo}}</div>
                    {{?}}
                    <div>{{=value.breedBatchName}}</div>
                    <div>{{=value.detailDeliveryAddress}}</div>
                    <div>
                        <div><span class="badge badge-default">{{=value.specLevelType}}</span>   <span class="red-900">{{=Utils.toThousands(value.planQty || value.orderCount,0)}}</span>头   <span class="red-900">{{=Utils.toThousands(value.estimatedAvgWeight)}}</span>kg <span class="red-900">{{=value.unitPrice}}</span>元</div>
                    </div>
                </div>
                <div class="weui-cell plantails" style="display: flex;justify-content: space-around;padding:0px" id="operate{{=value.seq}}">
                    <div style="flex:1;text-align:center;border-right: 1px solid #e6e6e6;padding:10px">
                        <div class="operation-button" data-flag="table-click-delete">
                            <i class="icon iconfont icon-linear-delete icon-font-size-24" style="font-size: 24px;color:#e24f2efd"
                               aria-hidden="true"></i>
                        </div>
                    </div>
                    <div style="flex:1;text-align:center;padding:10px">
                        <div class="operation-button" data-flag="table-click-edit">
                            <i class="icon iconfont icon-edit-no-border icon-font-size-24" style="font-size: 24px;color:#fe8636fd"
                               aria-hidden="true"></i>
                        </div>
                    </div>
                </div>
            </div>
            {{~}}
        </script>
    </head>

    <body>
        <div id="main-addsaleorders">
            <form id="addsaleorders-form">
                <div class="weui-cells__group weui-cells__group_form">
                    <p class="saleOrders-message">销售信息</p>
                    <div class="report-contents-item-box">
                        <div class="weui-cell weui-cell_select" style="padding: 15px" id="search-date">
                            <div class="weui-cell__hd stycon">
                                <label class="weui-label">
                                    业务日期
                                    <span class="red-900">&nbsp;*</span>
                                </label>
                            </div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" id="businessTime" placeholder="请选择业务日期..." required emptyTips="请选择业务日期" v-model="bizDate" />
                            </div>
                        </div>
                        <div class="weui-cell weui-cell_select" style="padding: 15px">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        销售组织
                                        <span class="red-900" style="position: absolute">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <input class="weui-input clearContent masterpad" type="text" v-model="saleOrgName" hidden />
                                    <select class="weui-select clearContent" id="saleOrgId" style="visibility: hidden" v-model="saleOrgId" required></select>
                                </span>
                            </div>
                        </div>
                        <div class="weui-cell weui-cell_select" style="padding: 15px">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        销&nbsp;售&nbsp;员
                                        <span class="red-900">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <input class="weui-input clearContent masterpad" type="text" v-model="salePerName" hidden />
                                    <select class="weui-select clearContent" id="salePerId" style="visibility: hidden" v-model="salePerId" required></select>
                                </span>
                            </div>
                        </div>
                        <div class="weui-cell weui-cell_select" style="padding: 15px">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        客&emsp;&nbsp;户
                                        <span class="red-900">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <input class="weui-input clearContent masterpad" type="text" v-model="cstmName" hidden />
                                    <select class="weui-select clearContent" id="selCustomerInfos" style="visibility: hidden" v-model="cstmId" required></select>
                                </span>
                            </div>
                        </div>
                        <div class="weui-cell weui-cell_select" style="padding: 15px">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        猪只类型
                                        <span class="red-900" style="position: absolute">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <select class="weui-select clearContent" id="pigType" style="visibility: hidden" v-model="pigType" required></select>
                                </span>
                            </div>
                        </div>
                        <div id="tranTypeDiv">
                            <div class="weui-cell weui-cell_select" style="padding: 15px">
                                <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                    <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                        <span>运输类型</span>
                                    </span>
                                    <span class="weui-cell__ft">
                                        <select class="weui-select clearContent" id="tranType" style="visibility: hidden" v-model="tranType" required></select>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <p class="saleOrders-message">销售汇总</p>
                    <div class="report-contents-item-box">
                        <div class="weui-cell" style="padding: 15px">
                            <!--<div class="weui-cell__hd sale-summary"><span id="totalCost">0</span><label class="weui-label">总价(元)</label></div>-->
                            <div class="weui-cell__hd sale-summary">
                                <span id="totalNum">0</span>
                                <label class="weui-label">总头数(头)</label>
                            </div>
                            <!--<div class="weui-cell__hd" style="width: 100px;"><span id="totalWeight">0</span><label class="weui-label">总均重(kg)</label></div>-->
                        </div>
                    </div>
                    <p class="saleOrders-message" style="margin-bottom: 0">
                        销售列表
                        <!--<div class="weui-cell__bd" style="text-align: right; margin-top: -40px; margin-right: 10px;">
                        <span id="add-salePlan">
                            <i class="icon iconfont icon-sb-01 icon-font-size-24 icon-click"
                               style="font-size: 24px;color:#07c160" aria-hidden="true"></i>
                        </span>
                        <span id="add-saleEntry">
                            <i class="icon iconfont icon-writerresume-01 icon-font-size-24 icon-click"
                               style="font-size: 24px;color:#07c160" aria-hidden="true"></i>
                        </span>
                    </div>-->
                    </p>

                    <a href="javascript:;" class="weui-btn weui-btn_primary" style="width: 46%; border-radius: 8px; margin-top: 10px; float: left; font-size: 15px; margin-left: 10px; background-color: #2196f3" id="add-salePlan">选择销售计划</a>
                    <a href="javascript:;" class="weui-btn weui-btn_primary" style="width: 46%; border-radius: 8px; margin-top: 10px; float: left; font-size: 15px; margin-left: 10px; background-color: #2196f3" id="add-saleEntry">新增</a>

                    <div id="salesEntry" style="margin-top: 55px"></div>
                    <div id="saleplansList"></div>
                    <p class="saleOrders-message">其他</p>
                    <div class="report-contents-item-box">
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd"><label class="weui-label">备注</label></div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" id="remark" placeholder="请输入备注..." />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px" id="uploader">
                            <div class="weui-cell__bd">
                                <div class="weui-uploader">
                                    <div class="weui-uploader__hd" style="text-align: left">
                                        <p class="weui-uploader__title">附件</p>
                                        <div class="weui-uploader__info">
                                            <span id="uploadCount">{{uploadCount}}</span>
                                            /3
                                        </div>
                                    </div>
                                    <div class="weui-uploader__bd">
                                        <ul class="weui-uploader__files" id="uploaderFiles"></ul>
                                        <div class="weui-uploader__input-box">
                                            <input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="report-contents-item-box operation">
                    <div class="weui-cell operation-child">
                        <a href="javascript:;" class="weui-btn weui-btn_default" style="width: 38%; border-radius: 8px; background-color: #fff; margin-left: 0px" id="returnMain">取消</a>
                        <a href="javascript:;" class="weui-btn weui-btn_primary" style="width: 60%; border-radius: 8px; margin-top: 0px; margin-right: 0px" id="informationSubmit" v-on:click="submit">保存</a>
                    </div>
                </div>
                <div style="height: 1px"></div>
            </form>
        </div>

        <!--底部弹出框-->
        <div id="pop"></div>
        <div class="show-box" style="display: none">
            <div class="title">
                <div class="tit">选择销售计划列表</div>
            </div>
            <hr />
            <div id="saleplans-list" style="overflow: auto; height: 100%"></div>
            <div class="report-contents-item-box" style="background-color: white; border: none; position: fixed; bottom: 0px; width: 100%">
                <div class="weui-cell bottom_btn" id="button-height" style="display: flex; justify-content: space-between; padding: 0px; margin-right: 20px; height: 90px">
                    <a href="javascript:;" class="weui-btn weui-btn_default" style="width: 40%; border-radius: 8px; margin-top: 10px; margin-left: -10px" id="returnAddSaleOrders">取消</a>
                    <a href="javascript:;" class="weui-btn weui-btn_primary" style="width: 55%; border-radius: 8px; margin-top: 10px" id="saleplansSubmit">确定</a>
                </div>
            </div>
        </div>

        <script type="text/javascript" src="../../../../public/vendor/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/weui/jquery-weui.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/vue/vue.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/moment/moment.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/weui/weui.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/weui/jquery-weui.min.js"></script>
        <script type="text/javascript" src="../../../../public/js/common/iosadaptation.js"></script>
        <script type="text/javascript" src="../../../../public/js/config/utils.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/select2/select2.full.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/select2/i18n/zh-CN.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/form-entries/form-entries.js"></script>

        <script type="module" src="../../../../public/js/features/breedsales/saleorders/addsaleorders.js"></script>
    </body>
</html>
